<!-- PAGE CONTENT WRAPPER -->
<div class="page-content-wrap">

    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default tabs">
                <ul class="nav nav-tabs nohref" role="tablist">
                    <li style="min-width: 150px;" ng-class="{'active':'tabInfo' == currentTabId}" ng-click="selectTab('tabInfo')">
                        <a href="javascript:void(0)" role="tab" data-toggle="tab">{{'基本信息' | dyLanguage}}</a>
                    </li>
                    <li style="min-width: 150px;" ng-class="{'active':'tabTask' == currentTabId}" ng-click="selectTab('tabTask')">
                        <a href="javascript:void(0)" role="tab" data-toggle="tab">{{'任务' | dyLanguage}}</a>
                    </li>
                </ul>
                <div class="panel-body tab-content">
                    <div class="panel-footer" style="text-align: right;">
                        <h3 class="panel-title" style="float: left;"><strong>{{'当前页面的操作' | dyLanguage}}</strong></h3>
                        <button class="btn btn-info" ng-click="save()"><i class="fa"></i>{{'保存' | dyLanguage}}</button>
                    </div>
                    <div class="tab-pane" ng-class="{'active':'tabInfo' == currentTabId}" id="tabInfo">
                        <div class="panel panel-default">
                            <div class="panel-body table-responsive">
                                <div class="row">
                                    <div>
                                        <form class="form-horizontal" name="validForm" novalidate>
                                            <div class="panel-default">
                                                <div class="panel-body panel-dialog">
                                                    <div class="form-group">
                                                        <label class="col-md-3 col-xs-12 control-label">{{'图片' | dyLanguage}}</label>

                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="profile-image">
                                                                <img style="min-height: 50px;min-width: 50px;max-width: 100px;max-height: 100px;" ng-src="{{currentContentTask.picture | faceUrl}}" ngf-select ngf-change="uploadPicture($files)"
                                                                     ngf-pattern="'image/*'" ngf-accept="'image/*'"
                                                                     ngf-max-size="20MB" ngf-min-height="100" ngf-resize="{width: 1000, height: 1000}" style="cursor: pointer"/>
                                                            </div>
                                                            <span class="help-block">{{'请上传图片' | dyLanguage}}<i style="cursor: pointer; "><span ng-show="showPictureProgress">({{pictureProgress.value}}%)</span></i></span>
                                                        </div>
                                                    </div>

                                                    <div class="form-group">
                                                        <label class="col-md-3 col-xs-12 control-label">{{'名称' | dyLanguage}}</label>

                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="input-group">
                                                                <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                                                <input type="text" class="form-control" name="name" ng-model="currentContentTask.name" required/>
                                                            </div>
                                                            <span class="help-block" ng-show="(addSCForm.name.$untouched && !addSCForm.$submitted) || addSCForm.name.$valid">{{'请输入名称' | dyLanguage}}</span>
                                                        </div>
                                                    </div>

                                                    <div class="form-group">
                                                        <label class="col-md-3 col-xs-12 control-label">{{'描述' | dyLanguage}}</label>

                                                        <div class="col-md-6 col-xs-12">
                                                            <textarea class="form-control" rows="5" ng-model="currentContentTask.remark"></textarea>
                                                            <span class="help-block">{{'请输入描述' | dyLanguage}}</span>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="tab-pane" ng-class="{'active':'tabTask' == currentTabId}" id="tabTask">
                        <div class="panel panel-default">
                            <div class="panel-body table-responsive">
                                <div class="panel-body table-responsive">
                                    <table class="table table-striped table-bordered">
                                        <thead>
                                        <tr>
                                            <th>{{'标题' | dyLanguage}}</th>
                                            <th>{{'内容' | dyLanguage}}</th>
                                            <th>{{'序号' | dyLanguage}}</th>
                                            <th>{{'必做' | dyLanguage}}</th>
                                            <th>{{'审核' | dyLanguage}}</th>
                                            <th class="optionTh"></th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr ng-repeat="record in currentContentTask.tasks | orderBy:['sort']">
                                            <td><a href="javascript:void(0)" ng-click="editTask(record)">{{record.subject}}</a></td>
                                            <td>{{record.content}}</td>
                                            <td>{{record.sort}}</td>
                                            <td>{{record.required? '是' : '否'}}
                                            <td>{{record.approve? '是' : '否'}}</td>
                                            <td>
                                                <a href="javascript:void(0)" ng-click="removeTask(record)">{{'移除' | dyLanguage}}</a>
                                                &nbsp;&nbsp;|&nbsp;&nbsp;
                                                <a href="javascript:void(0)" ng-click="taskMessage(record)">{{'答题内容' | dyLanguage}}</a>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                                <div class="panel-footer" style="text-align: center;">
                                    <button class="btn btn-info" ng-click="addTask()"><i class="fa fa-plus"></i>{{'新增' | dyLanguage}}</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel-footer" style="text-align: right;">
                        <h3 class="panel-title" style="float: left;"><strong>{{'当前页面的操作' | dyLanguage}}</strong></h3>
                        <button class="btn btn-info" ng-click="save()"><i class="fa"></i>{{'保存' | dyLanguage}}</button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- END PAGE CONTENT WRAPPER -->
</div>
